package com.example.server2.controller;

import com.example.server2.openfeign.Servertst1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

@RestController
@RefreshScope
@RequestMapping("/server2")
public class FeignTest {
    @Autowired
    private Servertst1 servertst1;

    @Value("${server2.appName}")
    private String appName;


    @GetMapping("/s")
    public String getOrderNo(@RequestParam("param") String param){
        System.out.println(appName);
        return servertst1.test1(param);
    }

}
